package com.task;

import com.service.ach.AchService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 业绩定时器
 * Created by lvjianqing on 2017/9/11.
 */
@Component
public class AchTask {
    Logger log = Logger.getLogger(AchTask.class);
    @Autowired
    private AchService achService;

    @Scheduled(cron = "0 0 0 16 * ?")
    public void print() {
        log.info("开始统计业绩~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        achService.countAch();
        log.info("完成统计业绩~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
}
